<div id="dashboard" role="navigation">
<ul role="navigation">
  <% if @user == current_user %>
    <li><%= span_if_current ts("My Dashboard"), @user %></li>
    <li><%= span_if_current ts("My Pseuds (%{my_pseud_number})", :my_pseud_number => @user.pseuds.count), user_pseuds_path(@user) %></li>
  <% else %>
    <li><%= span_if_current ts("Dashboard"), @user %></li>
    <li><%= span_if_current ts("Pseuds (%{pseud_number})", :pseud_number => @user.pseuds.count), user_pseuds_path(@user) %></li>
  <% end %>
  <% if @user.pseuds.size > 1 %>
    <li class="pseud">
      <a onclick="subnav_view.toggle()" title="Switch Pseuds">
			  <%= current_page?(@user) ? ts("Switch Pseuds") : (@author ? h(@author.name) + " &#8595;".html_safe : h(@user.login) + " &#8595;".html_safe) %>
			</a>
			<ul id="subnav">
  				<%= print_pseud_selector(@user.pseuds) %>
 				<li><a onclick="subnav_view.toggle()" style='cursor: pointer;' title="Close Pseud Switcher">Close</a></li>
			</ul>
    </li>
	<% end %>
	<li><%= @author ? print_pseud_works_link(@author) : print_works_link(@user) %></li>
	<% if @user == current_user %>
	<li><%= print_drafts_link(@user) %></li>
  <% end %>
	<li><%= @author ? print_pseud_series_link(@author) : print_series_link(@user) %></li>
	<% unless @user == User.orphan_account %>
	<li><%= @author ? print_pseud_bookmarks_link(@author) : print_bookmarks_link(@user) %></li>
	<% end %>
  <% if @user == current_user %>
    <li><%= span_if_current  ts("My Collections (%{my_collection_number})", :my_collection_number => @user.owned_collections.count), user_collections_path(@user) %> </li>
    <li><%= span_if_current ts("My Signups (%{my_signup_number})", :my_signup_number =>@user.challenge_signups.count), user_signups_path(@user) %> </li>
    <li><%= span_if_current ts("My Assignments (%{my_assignment_number})", :my_assignment_number => (@user.offer_assignments.undefaulted.count + @user.pinch_hit_assignments.undefaulted.count)), user_assignments_path(@user) %> </li>
    <li><%= span_if_current ts("My Gifts (%{my_gift_number})", :my_gift_number => @user.gifts.select {|g| g.work.visible?}.count), user_gifts_path(@user) %></li> 
    <li><%= span_if_current ts("My Related Works (%{my_related_works_number})", :my_related_works_number => (@user.related_works.count + @user.parent_work_relationships.count)), user_related_works_path(@user) %></li> 
    <li><%= span_if_current ts("My Inbox (%{my_inbox_number})", :my_inbox_number => @user.unread_inbox_comments_count.to_s), user_inbox_path(@user) %></li>
      <% if @user.preference.try(:history_enabled?) %>
        <li><%= span_if_current ts("My History"), user_readings_path(@user) %></li>
      <% end %>
    <li><%= link_to_help "coming-soon", ts("My Subscriptions") %></li>
    <li><%= span_if_current ts("My Preferences"), user_preferences_path(@user) %></li>
    <li><%= span_if_current ts("My Skins"), user_skins_path(@user) %></li>
  <% else %>
    <li><%= span_if_current ts("Collections (%{coll_number})", :coll_number => @user.owned_collections.count), user_collections_path(@user) %> </li>
    <li><%= span_if_current ts("Gifts (%{gift_number})", :gift_number => @user.gifts.select {|g| g.work.visible?}.count), user_gifts_path(@user) %></li>
  <% end %>
</ul>
</div>

